
(defineS (ptS-distance (pt x1 y1) (pt x2 y2))
  (hypotenuse (- x2 x1) (- y2 y1)))

(ptS-distance (make-pt 0 0) (make-pt 1 1)) ; => 1.4142135623730951

;; There is, of course, a cost associated with the match clauses...

(timeE (for-each (lambda (n) 
		   (ptS-distance (make-pt 0 0) (make-pt 1 1)))
		 (iota 10000)))

;; Non-structures are written (~ value).

(defineS (pt-scale (pt x y) (~ n))
  (make-pt (* n x) (* n y)))

(pt->ptL (pt-scale (make-pt 1 2) 1/2))	; => (1/2 1)

;; Redundant case, but don't do it!

(defineS (neg (~ n)) (- n))

(neg 5)					; => -5
